import requests

# 指定要下载的图片链接
image_url = "https://i0.wp.com/pic.4khd.com/-bQMPDUqAZac/ZZazxlcLjDl/AAAAAAAAhgc/7Liy1YjOejkEZoR26trGzl9Z4oAi62XRQCNcBGAsYHQ/w1300-rw/crazy-cat-ss-black-dress-4khd.com-001.webp?w=1300"

try:
    # 发送HTTP GET请求获取图片
    response = requests.get(image_url)
    response.raise_for_status()  # 检查请求是否成功

    # 保存图片文件，指定扩展名
    file_path = "crazy-cat-ss-black-dress-001.webp"  # 可以根据需要修改文件名

    with open(file_path, 'wb') as file:
        file.write(response.content)

    print(f"Downloaded: {file_path}")

except Exception as e:
    print(f"Failed to download {image_url}: {e}")